<?php
$config = array(
    'URL_MODEL'           => 2, // 如果你的环境不支持PATHINFO 请设置为3
    'DB_TYPE'             => 'mysql',
    'DB_HOST'             => 'localhost',
    'DB_NAME'             => 'examples',
    'DB_USER'             => 'root',
    'DB_PWD'              => '',
    'DB_PORT'             => '3306',
    'DB_PREFIX'           => 'safe_',
    'SHOW_PAGE_TRACE'     =>1,
    /* 模板相关配置 */
    'TMPL_PARSE_STRING' => array(
        '__JS__' => __ROOT__ . '/../Public/js',
    ),
);
if(isset($_ENV['VCAP_SERVICES'])){
    $json = json_decode($_ENV['VCAP_SERVICES'], true);
    $db = $json['mysql'][0]['credentials'];
    $file_root = $json['filesystem-1.0']['credentials']['host_path'];
    $config['DB_HOST'] = $db['hostname'];
    $config['DB_NAME'] = $db['name'];
    $config['DB_USER'] = $db['username'];
    $config['DB_PWD'] = $db['password'];
    $config['DB_PORT'] = $db['port'];
}
return $config;